<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="box">abc</div>
    <div id="id">def</div>
    <h3><span><input type="text"></span></h3>
</body>
    <script>
        var elem1 = document.querySelector('.box');
        console.log(elem1);
        var elem2 = document.querySelectorAll('div');
        console.log(elem2);
    </script>
</html>